from selenium import webdriver
from selenium.webdriver import Keys
from selenium.webdriver.firefox.service import Service

"""
    1、想要使用 selenium 来实现自动化测试 
        1、 导入模块
"""
service = Service(executable_path='../driver_exe/geckodriver.exe')
driver = webdriver.Firefox(service=service)

driver.get('https://www.baidu.com')
wbk = driver.find_element_by_id('kw')
# wbk.send_keys('selenium', Keys.RETURN)
wbk.send_keys('selenium')
ok = driver.find_element_by_id('su')
ok.click()

if __name__ == '__main__':
    pass
